package com.quan.auth.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.quan.auth.feign.UpmsUserService;
import com.quan.common.core.support.BaseController;

@RestController
@RequestMapping("/auth")
public class AuthController extends BaseController {

	@Autowired
	private UpmsUserService userService;
	
	/**
     * 获取授权用户的信息
     * @param user 当前用户
     * @return 授权信息
     */
    /*@GetMapping("/user")
    public Principal user(Principal user){
        return user;
    }*/
	
	@GetMapping("/test1")
	public Object test1() {
		return "test1" ;
	}
	
	@GetMapping("/test2")
	public Object test2() {
		return "test2" ;
	}
	
	@GetMapping("/findByAccount/{account}")
	public Object findByAccount(@PathVariable String account) {
		return this.userService.findByAccount(account) ;
	}
	
}
